package org.familysearch.fsapi.gwt.samples.client.handlers;

import java.util.ArrayList;

import org.familysearch.fsapi.gwt.common.client.entities.Temple;
import org.familysearch.fsapi.gwt.samples.client.TempleListSample;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class TempleListHandler implements AsyncCallback<ArrayList<Temple>> {

	public void onFailure(Throwable caught) {
		GWT.log(caught.getLocalizedMessage(), null);
		TempleListSample.get().showError(caught.getLocalizedMessage());
	}

	public void onSuccess(ArrayList<Temple> result) {
		GWT.log(result.toString());
		TempleListSample.get().showTemples(result);
	}

}
